<template>
	<el-config-provider :locale="elLocale">
		<div id="app">
			<VFormDesigner :formId="formId"/>
		</div>
	</el-config-provider>
</template>

<script>
import VFormDesigner from '@/components/designer/form-designer/index.vue'

import zhCNLang from 'element-plus/lib/locale/lang/zh-cn'
import enUSLang from 'element-plus/lib/locale/lang/en'

export default {
	name: 'Form Designer',
	components: {
		VFormDesigner,
	},
	data() {
		return {
			elLocaleMap: {
				'zh-cn': zhCNLang,
				'en': enUSLang,
			},
			formId:this.$route.query.formId
		}
	},
	computed: {
		elLocale() {
			let curLocale = localStorage.getItem('APP_LANG') || 'zh-cn'
			return this.elLocaleMap[curLocale]
		},

	},
}
</script>

<style lang="scss">
#app {
	height: 100%;
}
</style>
